/*
 * Copyright (c) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ITIMELINE_H
#define ITIMELINE_H

#include <iremote_broker.h>
#include "iremote_object.h"
#include "itimeline_callback.h"
#include "timeline_data_utils.h"
#include "timeline_database_info.h"

namespace OHOS {
namespace Msdp {
class ITimeline : public IRemoteBroker {
public:
    enum {
        TIMELINE_SUBSCRIBE = 0,
        TIMELINE_UNSUBSCRIBE,
        TIMELINE_SETPOSITIONSTATE,
        TIMELINE_SETHOMEPOSITION,
        TIMELINE_SETCOMPANYPOSITION,
        TIMELINE_SETSLEEPTIME,
        TIMELINE_SETRESTTIME,
        TIMELINE_SETWORKTIME,
        TIMELINE_GETSLEEPTIME,
        TIMELINE_GETWAKEUPTIME,
        TIMELINE_GETSTARTRESTTIME,
        TIMELINE_GETENDRESTTIME,
        TIMELINE_GETSTARTWORKTIME,
        TIMELINE_GETENDWORKTIME,
        TIMELINE_GETFORCECAST,
    };

    virtual void Subscribe(const TimelineDataUtils::TimelineArea& area, const sptr<ITimelineCallback>& callback) = 0;
    virtual void UnSubscribe(const TimelineDataUtils::TimelineArea& area, const sptr<ITimelineCallback>& callback) = 0;
    virtual bool SetPositionState(int32_t homevalue, int32_t companyvalue) = 0;
    virtual bool SetHomePosition(double longitude, double latitude) = 0;
    virtual bool SetCompanyPosition(double longitude, double latitude) = 0;
    virtual bool SetSleepTime(int32_t sleeptime, int32_t wakeuptime) = 0;
    virtual bool SetRestTime(int32_t resttimestart, int32_t resttimeend) = 0;
    virtual bool SetWorkTime(int32_t worktimestart, int32_t worktimeend) = 0;
    virtual uint32_t GetSleepTime() = 0;
    virtual uint32_t GetWakeupTime() = 0;
    virtual uint32_t GetRestTimeStart() = 0;
    virtual uint32_t GetRestTimeEnd() = 0;
    virtual uint32_t GetWorkTimeStart() = 0;
    virtual uint32_t GetWorkTimeEnd() = 0;
    virtual TimelineDatabaseInfo::ForcecastPosition GetForcecast(uint32_t time) = 0;

    DECLARE_INTERFACE_DESCRIPTOR(u"ohos.msdp.ITimeline");
};
} // namespace Msdp
} // namespace OHOS
#endif // ITIMELINE_H